package fhp.hlhj.giantfold.presenter

import com.lzy.okgo.model.HttpParams
import fhp.hlhj.giantfold.interfaces.ISelfOrder
import fhp.hlhj.giantfold.javaBean.SelfOrderBean
import fhp.hlhj.giantfold.module.SelfOrderModule

/**
 * author: FHP
 * data: on 2018\1\25 0025 16:49
 * E-Mail: 103945089@qq.com
 */
class SelfOrderPresenter(private val iSelfOrder: ISelfOrder) : SelfOrderModule.SelfOrderListener {
    private val module=SelfOrderModule()

    fun getSelfOrder(params: HttpParams){
        module.getselfOrder(params,this)
    }

    override fun showLoading() {
        iSelfOrder.showLoading()
    }

    override fun onLoadOrderListener(selfOrderBean: SelfOrderBean) {
        iSelfOrder.getSelfOrders(selfOrderBean)
    }

    fun setAdp(){
        iSelfOrder.setAdp()
    }
}